//
//  MLocationView.m
//  Gunz
//
//  Created by Joggy on 16/5/23.
//  Copyright © 2016年 NUPT. All rights reserved.
//

#import "MLocationView.h"
#import "GZConst.h"

@implementation MLocationView

-(instancetype)init {
    self = [super initWithFrame:CGRectMake(0, 0, 120, 44)];
    UIImageView *locaIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 13, 18)];
    locaIcon.layer.position = CGPointMake(13/2.0, self.frame.size.height/2);
    locaIcon.image = [UIImage imageNamed:@"main_location"];
    [self addSubview:locaIcon];
    _locationButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [_locationButton setAttributedTitle:[[NSAttributedString alloc] initWithString:@"全国" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize: 14], NSForegroundColorAttributeName: CUSTOM_GREEN, NSUnderlineStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]}] forState:UIControlStateNormal];
    _locationButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    _locationButton.frame = CGRectMake(15, 0, 105, 44);
    [self addSubview:_locationButton];
    return self;
}

@end
